<div
  class="x-button"
  [tabindex]="tabindex"
  [ngClass]="classMap"
  [class.x-button-only-icon]="onlyIcon"
  [class.x-button-activated]="activated"
  [class.x-button-disabled]="disabled"
  [class.x-button-round]="round"
  [class.x-button-circle]="circle"
  [class.x-button-icon]="icon && !content.innerHTML.trim()"
  [class.x-button-closable]="closable"
  [title]="title"
  x-ripple
  [type]="type"
  [disabled]="disabled"
>
  <x-icon *ngIf="icon && !loading" [type]="icon"></x-icon>
  <x-icon *ngIf="loading" type="fto-loader" [spin]="loading"></x-icon>
  <span #content><ng-content></ng-content></span>
</div>

<!-- 提前加载 loading 的图标-->
<x-icon *ngIf="loading" [style.display]="'none'" type="fto-loader"></x-icon>
